package cn.tianjindong.blog_portal.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.tianjindong.blog.mapper.BlogArticleMapper;
import cn.tianjindong.blog.mapper.BlogTagMapper;
import cn.tianjindong.blog.pojo.BlogTag;
import cn.tianjindong.blog.pojo.BlogTagExample;
import cn.tianjindong.blog_portal.service.TagsService;

@Service
public class TagsServiceImpl implements TagsService {

	@Autowired
	private BlogTagMapper tagMapper;
	
	@Override
	public List<BlogTag> getTagList() {
		List<BlogTag> list = tagMapper.selectByExample(new BlogTagExample());
		return list;
	}

	@Override
	public BlogTag getTagById(Long tagId) {
		BlogTag tag = tagMapper.selectByPrimaryKey(tagId);
		return tag;
	}
	
}
